<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center">
        <div class="webmap">
            <a href="javascript:;" class="easyui-link" data-options="plain:true">媒体管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">文章管理</a>
        </div>
        <div class="querybycon">
            <form id="query">
                <div class="queryinfo">
                    <div> 栏目 <input class="easyui-combobox" name="category"
                                    data-options="url:'/dictionary/mediaType'"></div>
                    <div> 标题<input type="text" name="title" maxlength="10"></div>
                    <div> 状态 <input class="easyui-combobox" name="state"
                                    data-options="url:'/dictionary/pubStatusType'"></div>
                    <div class="query">
                        <a id="querybtn" href="javascript:;" class="easyui-linkbutton  "
                           data-options="iconCls:'fa fa-search'"></a>
                    </div>
                </div>
            </form>
        </div>
        <div class="querybtn">

            <a id="add" href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'">添加</a>
            <a id="edit" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'fa fa-pencil'">编辑</a>
            <a id="del" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'fa fa-remove '">删除</a>
            <a id="detail" href="javascript:;" class="easyui-linkbutton"
               data-options="iconCls:'fa fa-search '">查看</a>
            <div style="visibility: hidden;">aa</div>
        </div>

    </div>
    <div data-options="region:'center'">
        <table id="list"></table>
    </div>
</div>

<script type="text/javascript">
    var addUrl = "page/media/mediaadd.html";
    var editUrl = "page/media/mediaedit.html";
    var detailUrl = "page/media/mediainfo.html";
    var delUrl = '/media/del';
    var save = '/media/save';
    var listUrl = "/media/list";
    var edit = "/media/edit";
    var detail = "/media/edit";
    var columns = [[{
        field: 'id',
        checkbox: true
    }, {
        field: 'category',
        title: '栏目',
        formatter: function (value, row, index) {
            if (value == "notice") {
                return "平台公告";
            } else if (value == "companyDynamic") {
                return "公司动态";
            } else if (value == "news") {
                return "媒体报道";
            } else if (value == "consultation") {
                return "行业咨询";
            } else if (value == "companyProfile") {
                return "公司简介";
            } else if (value == "contactUs") {
                return "联系我们";
            } else if (value == "joinUs") {
                return "加入我们";
            } else if (value == "toInvest") {
                return "我要投资";
            } else if (value == "toLoan") {
                return "我要借款";
            } else if (value == "accountManagement") {
                return "账号管理";
            } else if (value == "securityAssurance") {
                return "安全保障";
            }
        }
    }, {
        field: 'title',
        title: '标题',
    }, {
        field: 'state',
        title: '状态',
        formatter: function (value, row, index) {
            return dic["pubStatusType"][value.toString()];
        }
    }, {
        field: 'preview',
        title: '问题描述',
    }, {
        field: 'publishTime',
        title: '发布时间',
    }]];
    list.init({url: listUrl, columns: columns});
</script>
